import {axios} from '@/utils/request'
const basePrefix = '/api'
 export default {
   // 获取工艺路线列表
   getMesPeProcessRouteList: (params) => {
      return axios.get(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/list`, {params})
   },
   // 获取工序
   getProcesstree: (params) => {
      return axios.get(`${basePrefix}/mes-craft/craft/mesPeDefinition/search/tree`, {params})
   },
   // 获取一级工序
   getAllFirstDef: (params) => {
      return axios.get(`${basePrefix}/mes-craft/craft/mesPeDefinition/getAllFirstDef`, {params})
   },
   // 获取一级工序下所有的二级工序和工站
   getAllUnderFirstDef: (params) => {
      return axios.get(`${basePrefix}/mes-craft/craft/mesPeDefinition/getAllUnderFirstDef`, {params})
   },
   // 资源维护集合-通过工艺路线编码，版本号，工站编码查询
   queryMesPeResourcesMaintainByMainId: (params) => { 
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/queryMesPeResourcesMaintainByMainId`, params)
   },
   // 分页获取技能库列表
   getMesHrSkillBank: (params) => {
      return axios.get(`${basePrefix}/mes-manpower/mesHrSkillBank/list`, {params})
   },
   // 分页获取已有技能列表
   getMesPeSkill: (params) => {
      return axios.get(`${basePrefix}/mes-craft/mesPeSkill/list`, {params})
   },
   // 获取全部技能
   getMesPeSkillAll: (params) => {
      return axios.get(`${basePrefix}/mes-craft/craft/mesPeSkill/all`,{params})
   },
   // 分页获取程序信息列表
   getMesPeProcedure: (params) => {
      return axios.get(`${basePrefix}/mes-craft/mesPeProcedure/list`, {params})
   },
   // 工序定义-通过编码查询 工站可配置的页签
   queryByDefinitionCode: (params) => {
      return axios.get(`${basePrefix}/mes-craft/craft/mesPeDefinition/queryByDefinitionCode`, {params})
   },
   // 产品编码下拉列表
   queryNotMaterielList: (params) => {
      return axios.get(`${basePrefix}/basic-business/auto/baCpinfoMain/queryNotMaterielList`, {params})
   },
   // 产品编码分页列表
   queryNotMaterielPage: (params) => {
      return axios.get(`${basePrefix}/basic-business/auto/baCpinfoMain/queryNotMaterielPage`, {params})
   },
   // 字典数据
   sysDictItem: (params) => {
      return axios.get(`${basePrefix}/basic-business/sys/dict/getDictItems/${params}`)
   },
   // 通过产品编码获取工艺路线编码
   getRouteCodeByProductCode: (params) => {
      return axios.get(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/getRouteCodeByProductCode`, {params})
   },
   // 工艺路线-添加
   postMesPeProcessRoute: (params) => {
      // return axios.post(`/junchen/mes-craft/craft/mesPeProcessRoute/add`, params)
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/add`, params)
   },
   // 根据产品编码BOMList列表查询
   queryAllBomInfo: (params) => {
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/queryAllBomInfo`, params)
   },
   // 根据父节点获取子节点(获取设备类型树)
   getEquipmentTypeNode: (params) => {
      return axios.get(`${basePrefix}/equipment-service/equipmentType/node`, {params})
   },
   // 根据类型id获取设备集合
   getEquipments: (params) => {
      return axios.get(`${basePrefix}/equipment-service/equipmentType/getEquipments`, {params})
   },
   // 获取点检内容集合
   getTaskItems: () => {
      return axios.get(`${basePrefix}/base-service/taskItem/getTaskItems`)
   },
   // 根据工序编码获取该工序关联的资源类型和资源名称编码
   getResourceByProcessCode: (params) => {
      return axios.get(`${basePrefix}/mes-craft/mesPeResource/getResourceByProcessCode`, {params})
   },
   // 根据工艺路线编码，版本号获取工艺路线
   getRouter: (params) => {
      // return axios.post(`/junchen/mes-craft/craft/mesPeProcessRoute/getRouter`, params)
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/getRouter`, params)
   },
   // 复制新增工艺路线
   copyRouter: (params) => {
      // return axios.post(`/junchen/mes-craft/craft/mesPeProcessRoute/getRouter`, params)
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/copyRouter`, params)
   },
   // 根据产品编码和资源编码获取开线点检模板细表
   getTemplatelist: (params) => {
      return axios.get(`${basePrefix}/basic-business/mesBaSpotchecktemplatelist/getTemplatelist`, {params})
   },
   // 工艺路线送审
   mesPeProcessRouteSubmit: (params) => {
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/submit`, params)
   },
   // 工站基本属性集合-通过工艺路线编码，版本号，工站编码查询
   queryMesPeMakingByMainId: (params) => {
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/queryMesPeMakingByMainId`, params)
   },
   //资源维护集合-通过工艺路线编码，版本号，工站编码查询
   queryMesPeResourcesMaintainByMainId: (params) => {
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/queryMesPeResourcesMaintainByMainId`, params)
   },
   //程序信息-通过工艺路线编码，版本号，工站编码查询
   queryProcedureByMainId: (params) => {
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/queryProcedureByMainId`, params)
   },
   //工序BOM维护集合-通过工艺路线编码，版本号，工站编码查询
   queryMesPeBomMaintenanceByMainId: (params) => {
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/queryMesPeBomMaintenanceByMainId`, params)
   },
   //工站SOP制作图片集合-通过工艺路线编码，版本号，工站编码查询
   getSopPic: (params) => {
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/getSopPic`, params)
   },
   //操作步骤&注意事项集合-通过工艺路线编码，版本号，工站编码查询
   getMatterAttention: (params) => {
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/getMatterAttention`, params)
   },
   // 工艺路线意见审批
   mesPeProcessRouteApprove: (params) => {
      return axios.post(`${basePrefix}/mes-craft/craft/mesPeProcessRoute/approve`, params)
   },
}